Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard modding #3227

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Feb 12, 2025

A new mod type was added: '.dashboard'. Usual modcache treatment: ZIP/directory under 'mods/', recorded in cache file 'mods.cache', viewable/searchable in SelectorUI, can have preview image.

Added new cvars 'ui_default_truck_dash', 'ui_default_boat_dash'.(string) - stores the name of default dashboard, you can change it via Settings (tab UI). For testing, I reused older demo dashboard "dashtut":
dashtut.zip
dashtut_w_font.zip

image

Example of the .dashboard file:

; A dashboard mod MUST contain a '.dashboard' file, even if just empty.
; Recognized parameters:
; * dashboard_name <string>
; * dashboard_description <string>
; * dashboard_author <string: credit> <int: forum ID> <string: name> <string: email>
; * dashboard_category <int: 200=Generic, 201=Truck, 202=Boat>
;
; All layout+resource files must start the same as the .dashboard file.
; For example: foo.dashboard -> foo_dashboard.layout, foo_dashboard.resource
; Optional layout filename tags:
; * '_Nrpm' ~ N is the redline RPM
; * '_Xph' ~ X is units (k=Kilometers | m=Miles)
; ------------------------------------------------------------

dashboard_name "dashtut_w_font"
dashboard_description "Tutorial Dashboard (with custom font!)"
dashboard_category 201

The dashboard spawning was fixed, using custom texturedashboards should not block HUD anymore.

@ohlidalp ohlidalp force-pushed the mark_dashboard_modding branch 3 times, most recently from f9054c2 to 15f3ac0 Compare February 17, 2025 21:56
Usual modcache treatment: recorded in cache file 'mods.cache', viewable/searchable in SelectorUI, can have preview image.
Removed cvar 'gfx_speedo_digital', made digital/analog separate .dashboard files
For examples, see files 'default_*.dashboard' (truck digital/analog, boat), added to 'dashboards.zip'.
Note: in the Selector UI, preview images for dashboards are only shrunk if needed but not enlarged so players see actual in-game size ~ suggested by Mark.

2 new cvars were added: 'ui_default_truck_dash', 'ui_default_boat_dash' (string) - these store the names of default dashboards, you can change them via Settings (tab UI).

Custom fonts are supported via .resource files (XML, same syntax as MyGui_FontsDash.xml in 'dashboards.zip').
@ohlidalp ohlidalp force-pushed the mark_dashboard_modding branch from 15f3ac0 to 4eb1a45 Compare February 17, 2025 22:10
Caused by bad material cleanup, introduced in 1cbf91f with the mouse-hover highlights.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant